import { TemplateSchema } from '@/api/exam/template/types';

export enum ProjectMode {
  Exam = 'Exam',
  Survey = 'Survey'
}

export interface ProjectVO {
  /**
   * 项目ID
   */
  id: string;

  /**
   * 项目名称
   */
  name: string;

  /**
   * 模式
   */
  mode: string;

  /**
   * 内容
   */
  survey: TemplateSchema;


  /**
   * 状态
   */
  status: string;

  count?: number;

  /**
   * 配置
   */
  setting?: ProjectSetting;

  /**
   * 备注信息
   */
  remark: string;

}

export interface ProjectForm extends BaseEntity {
  /**
   * 项目ID
   */
  id?: string | number;

  /**
   * 项目名称
   */
  name?: string;

  /**
   * 模式
   */
  mode?: string;

  /**
   * 项目内容
   */
  survey?: TemplateSchema;

  /**
   * 状态
   */
  status?: string;

  /**
   * 项目配置
   */
  setting?: ProjectSetting;

  /**
   * 备注信息
   */
  remark?: string;

}

export interface ProjectQuery extends PageQuery {

  /**
   * 项目名称
   */
  name?: string;

  /**
   * 模式
   */
  mode?: string;

  /**
   * 项目内容
   */
  survey?: TemplateSchema;

  /**
   * 状态
   */
  status?: string;

  /**
   * 项目配置
   */
  setting?: string;

  /**
   * 日期范围参数
   */
  params?: any;
}

export interface ProjectSetting {
  mode: ProjectMode,
  answerSetting:{
    progressBar: boolean,
    onePageOneQuestion: boolean,
    answerSheetVisible: boolean,
    autoSave: boolean,
    questionNumber: boolean,
    copyEnabled: boolean,
  },
  submittedSetting?:{},
  examSetting:{
    randomProject:any,
  }
}

export interface RandomProjectVo {
  id: number | string,
  repoId?: number | string,
  questionTypes?: Array<string> | null,
  tags?: Array<string> | null,
  num?: number | null,
  score?: number | null
}

export interface ProjectQuestionForm {
  id?: number | string,
  title?: string,
  description?: string,
  type?: string,
  attribute?: any,
  children?: Array<any> | any,
}


